'use strict';
var jwt = require('jsonwebtoken');
const Controller = require('egg').Controller;

class PhoneController extends Controller {
  async phoneDetail(query) {
    const { id } = this.ctx.query;
    const data = {
      '00000001': {
        id: ['00000001-1', '00000001-2'],
        brand: '文具',
        type: '钢笔',
        price: '89.00',
        ram: '4GB',
        rom: '64GB',
        os: 'Android',
        description: '新华定制 新华英雄钢笔，亲历经典情怀，书写时代精神',
        comment: '26',
        color: ['单次款', '两用款'],
        weight: '0.46kg',
        image: [
          'https://img7.xinhuashudian.com/images/2020/12/03/7768f70f-7a97-4297-a5e9-2947122de243.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img6.xinhuashudian.com/images/2021/03/17/aafe65a3-44a3-4b49-b41d-7dd3433de32b.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp'
        ],
        detail_url: 'https://img8.xinhuashudian.com/images/2020/11/19/22b61c88-ce3e-42ce-a373-e353130538ad.jpg'
      },
      '00000002': {
        id: ['00000002-1', '00000002-2', '00000002-3', '00000002-4', '00000002-5'],
        brand: '纪念币',
        type: '珍藏版',
        price: '199.00',
        ram: '4GB',
        rom: '64GB',
        os: 'Android',
        description: '限量发行百年辉煌纪念币整版票珍藏集，不忘初心，牢记使命',
        comment: '46万+',
        color: ['珍藏集', '纪念币', '珍邮'],
        weight: '0.46kg',
        image: [
          'https://img7.xinhuashudian.com/images/2021/09/24/ee4f9634-1cd2-461d-a1a4-ca5ce103dbf3.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img6.xinhuashudian.com/images/2021/09/23/4385d77f-3f55-4e8d-a393-060be1b90c3f.png?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img6.xinhuashudian.com/images/2021/09/24/b7e43162-d137-4ebf-8746-90676f0a0b7b.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp'
        ],
        detail_url: "https://img8.xinhuashudian.com/images/2021/09/24/5bac58a5-f1b5-4faa-9ca7-42c61c6835c2.jpg"
      },
      '00000003': {
        id: ['00000003-1'],
        brand: '桌游',
        type: '小米8',
        price: '99.00',
        ram: '6GB',
        rom: '64GB',
        os: 'Android',
        description: '新华定制 《强国梦》文创桌游，让参与者在游戏娱乐中高效理解掌握党的思想政治理论知识的丰富内涵',
        comment: '28万+',
        color: ['外观', '内部细节'],
        weight: '0.44kg',
        image: [
          'https://img3.xinhuashudian.com/images/2020/07/30/e55edfe3-9b9e-4bd5-bbef-733f8defc0f4.png?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp/watermark,image_aW1hZ2VzLzIwMTgvMDcvMjEvNTc4N2Q2YWMtNGU1YS00NzQxLTkzNWUtYWY3NDk1Mzc3OWE3LnBuZw==,t_50,g_center',
          'https://img6.xinhuashudian.com/images/2020/07/30/48dd5aeb-3eb0-4c27-bfb6-efec6914f127.png?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
        ],
        detail_url: "https://img5.xinhuashudian.com/images/2020/07/30/00a185a0-ff9b-4d21-9c1a-42ac62c8e15d.jpg"
      },
      '00000004': {
        id: ['00000004-1'],
        brand: '文具',
        type: 'iphone8',
        price: '32.00',
        ram: '2GB',
        rom: '64GB',
        os: 'ios',
        description: '韵文博鉴 我爱中国字母笔 一盒七支，士不可以不弘毅，任重而道远，当从一笔一划开始积累，建设祖国',
        comment: '86万+',
        color: ['外观', '内部细节'],
        weight: '0.44kg',
        image: [
          'https://img2.xinhuashudian.com/images/2021/06/02/643f021a-6acf-49a6-8d9b-2b736ab48d16.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img7.xinhuashudian.com/images/2021/06/02/ae859980-d83a-4ddb-86a2-90d9c15ff6ff.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
        ],
        detail_url: "https://img7.xinhuashudian.com/images/2021/06/02/03c860fc-90cb-491e-ac33-fe6f30e05a88.jpg"
      },
      '00000005': {
        id: ['00000005-1'],
        brand: '数码',
        type: 'Galaxy On5（G5500                        HB ）',
        price: '160.00',
        ram: '1GB',
        rom: '8GB',
        os: 'Android',
        description: '“红色圣地”延安宝塔山折叠无线充电鼠标垫，象征着中华名族坚强不屈、英勇抗敌的勇气',
        comment: '200+',
        color: ['延安宝塔山', '北京香山', '敦煌飞天', '强国定制'],
        weight: '0.25kg',
        image: [
          'https://img9.xinhuashudian.com/images/2021/08/25/e118c713-ca84-4aff-9de5-4a812aa4dbf2.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img8.xinhuashudian.com/images/2021/08/25/a8b294d7-4b03-4fa1-bdc6-ec763f6e03a5.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img7.xinhuashudian.com/images/2022/03/18/48791803-a922-4ba9-9100-631fd129e23b.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img9.xinhuashudian.com/images/2021/12/31/bac19d06-e83f-401c-aae4-bf5c29579d12.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp'
        ],
        detail_url: "https://img8.xinhuashudian.com/images/2021/08/25/94a06764-a159-46fb-8ee9-8fa58dccce24.jpg"
      },
      '00000006': {
        id: ['00000006-1'],
        brand: '积木',
        type: 'Find X',
        price: '351.00',
        ram: '8GB',
        rom: '128GB',
        os: 'Android',
        description: '【国家名胜文化经典】黄鹤楼建筑积木，独特的中华文化',
        comment: '31万+',
        color: ['黄鹤楼', '大雁塔', '人民大会堂'],
        weight: '0.59kg',
        image: [
          'https://img3.xinhuashudian.com/images/2021/04/14/ea45d156-fe81-4914-96be-524b98b4cd79.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img3.xinhuashudian.com/images/2021/08/25/4cf8ab8c-5370-49b1-8bde-0cdca2caf7f0.png?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img5.xinhuashudian.com/images/2021/08/18/606558e9-2c49-426c-93c8-f2d1f2cb413b.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp'
        ],
        detail_url: "https://img2.xinhuashudian.com/images/2021/04/14/e76f3a63-f3a9-422f-9dc5-f5802fea0d0f.jpg"
      },
      '00000007': {
        id: ['00000007-1'],
        brand: '生活用品',
        type: '小米MIX2S',
        price: '126.00',
        ram: '6GB',
        rom: '128GB',
        os: 'Android',
        description: '延安中国红色书店 中国红色书店茶具套盒，延安精神永久流传',
        comment: '28万+',
        color: ['延安', '香山宝塔'],
        weight: '0.59kg',
        image: [
          'https://img4.xinhuashudian.com/images/2019/05/09/c5ff8a1d-0429-476e-a96d-a36fa15945a2.png?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img8.xinhuashudian.com/images/2021/06/03/1ec86428-d283-48b5-9243-d0a0460cb8ca.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img11.360buyimg.com/n1/s450x450_jfs/t24673/3/265229373/117727/740c5111/5b6a6467N8aac10e4.jpg'
        ],
        detail_url: "https://img1.xinhuashudian.com/images/2019/05/09/0bfddd00-55fe-4d36-b28b-27e76dabf784.png"
      },
      '00000008': {
        id: ['00000008-1'],
        brand: '生活用品',
        type: 'iPhone X',
        price: '189.00',
        ram: '3GB',
        rom: '64GB',
        os: 'ios',
        description: '「海水江崖纹」金丝珐琅彩杯 云作好物，中华传统纹样图案之一',
        comment: '79万+',
        color: ['玉白','霁红','黛黑','芽黄'],
        weight: '0.44kg',
        image: [
          'https://img2.xinhuashudian.com/images/2020/12/22/8a50af2c-14ca-4622-ad68-a1988f9bf7b4.jpg',
          'https://img4.xinhuashudian.com/images/2020/12/22/3dd21a43-cf7e-4700-a454-2b2921a5d1f4.jpg?x-oss-process=image/resize,m_mfit,h_750,w_750/format,webp',
          'https://img2.xinhuashudian.com/images/2020/12/22/66501e70-09de-4a3a-84fb-61171c1d41e2.jpg',
          'https://img7.xinhuashudian.com/images/2020/12/23/a5d97863-6377-48e4-969e-79247064caee.jpg'
        ],
        detail_url: "https://img5.xinhuashudian.com/images/2020/12/23/94141167-9278-4ab6-ae8d-1a95b5e2c39e.jpg"
      }
    }
    this.ctx.body = data[id];
  }
}

module.exports = PhoneController;
